#ifndef CAMERAHELPER_H
#define CAMERAHELPER_H


#include <boost/date_time/posix_time/posix_time.hpp>

// #include "device/camera.h"
#include "src/pubimp.h"

class CameraHelper
{
public:

    static CameraHelper* GetInstance(){
        static QMutex mutex;
        static QScopedPointer<CameraHelper> inst;
        if (Q_UNLIKELY(!inst)) {
            mutex.lock();
            if (!inst) {
                inst.reset(new CameraHelper);
            }
            mutex.unlock();
        }
        return inst.data();
    }

    int OpenCamera();
    int CloseCamera();

//    bool isOpened() {
//        return _camera_ptr->IsDeviceConnected();
//    }

//    cv::Mat GetPictrue(){
//        return _camera_ptr.get()->getImg().clone();

//        //return _camera_ptr->takePicture().clone();

//        //return GetCamera()->getImg().clone();
//    }


private:
    CameraHelper();
    std::fstream ofsR ;
    /// 相机
    //std::shared_ptr<Camera> _camera_ptr ;

};

#endif // CAMERAHELPER_H
